<template>
	<view class="wrap">
		<view class="swiper-item">
							<scroll-view v-if="evaluation.length" scroll-y style="height: 100%;width: 100%;">
								<view class="page-box">
									<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
										<view class="page-box">
											<view class="order" v-for="(res, index) in evaluation" :key="res.id">
												<view class="top">
													<view class="left">
														<u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon>
														<view class="store">{{ res.shopName }}</view>
														<u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>
													</view>
													<view class="right">{{ res.deal }}</view>
												</view>
												
												<view class="item" v-for="(item, idx) in res.goodList" :key="idx">
													<view class="mark_detail">
														<text>评价详情</text>
														<view class="detail">
															桌子不错，跟描述的一样
														</view>
													</view>
													<view class="view_img_cont">
														<view class="view_img_box" v-for="(items,ind) of item.Image" :key="n">
															<image :src="items" mode="" class="view_img" @tap="preview(index,idx,$event)" :id="(item.Image)[ind]"></image>
														</view>
													</view>
													<view class="gooditem">
														<view class="left"><image :src="item.img" mode="aspectFill"></image></view>
														<view class="content">
															<view class="title u-line-2">{{ item.title }}</view>
															<view class="type">{{ item.sub_title}}</view>
														</view>
														<view class="right">
															<view class="price">
																￥{{ item.price |Int }}
																<text class="decimal">.{{ item.price |duts }}</text>
															</view>
															<view class="point">
																{{item.point}}分
															</view>
															<view class="number">x{{item.num}}</view>
														</view>
													</view>
												</view>
												<view class="total">
													<text>商家回复:</text>
													<view class="">
														您评价的太好了，添加微信，返现2元
													</view>
												</view>
												
											</view>
											<u-loadmore :status="loadStatus[4]" :bgColor="$backgroundPage"></u-loadmore>
										</view>
									</scroll-view>
								</view>
							</scroll-view>
							<view v-else>
								<view class="centre">
									<image src="https://cdn.uviewui.com/uview/template/taobao-order.png" mode=""></image>
									<view class="explain">
										您还没有相关的订单
										<view class="tips">可以去看看有那些想买的</view>
									</view>
									<view class="btn">随便逛逛</view>
								</view>
							</view>
						</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				evaluation:[{
					id:1,
					shopName: "富尔玛家居",
					photo:'@/static/icon/shop.png',
					goodList: [{
							"id": "01",
							"title": "商品2",
							Image:["/static/image/goods_item.png","/static/image/goods_item.png","/static/image/goods_item.png","/static/image/goods_item.png"],
							"img":"/static/image/goods_item.png",
							"sub_title": "KFR-26GW/NhPaB1W KFR-26GW/NhPaB1W KFR-26GW/NhPaB1W",
							"price": 3444,
							"num": 3,
							"point":2000
						},
					]
				},]
			}
		},
		methods: {
			preview(index,idx,res) {
				let myindex = res.currentTarget.id;
			
				uni.previewImage({
					urls: this.evaluation[index].goodList[idx].Image,
					current: myindex,
					longPressActions: {
						itemList: ['发送给朋友', '保存图片', '收藏'],
			
					}
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	page{
		background-color: $backgroundPage
	}
.order {
	width: 710rpx;
	background-color: #ffffff;
	margin: 30rpx auto;
	border-radius: 20rpx;
	box-sizing: border-box;
	padding: 30rpx;
	font-size: 28rpx;
	.top {
		display: flex;
		justify-content: space-between;
		.left {
			display: flex;
			align-items: center;
			.store {
				margin: 0 10rpx;
				font-size: 30rpx;
				font-weight: bold;
			}
		}
		.right {
			color: #F8321D;
		}
	}
	.item {
		display: flex;
		flex-direction: column;
		margin: 40rpx 0 0;
		.mark_detail{
			color: #666666;
			font-size: 28rpx;
			display: flex;
			.detail{
				margin-left: 10rpx;
			}
		}
		.view_img_cont {
			width: 100%;
			margin: 0rpx 0rpx 8rpx 0;
			display: flex;
			flex-wrap: wrap;
			margin-top: 22rpx;
			.view_img_box {
				margin: 0;
				margin: 0rpx 20rpx 22rpx 0;
				height: 160rpx;
				width: 180rpx;
		
				.view_img {
					height: 100%;
					width: 100%;
				}
			}
		}
		
		.gooditem{
			display:flex;
		}
		.left {
			margin-right: 20rpx;
			image {
				width: 160rpx;
				height: 160rpx;
				border-radius: 10rpx;
			}
		}
		.content {
			.title {
				font-size: 22rpx;
				font-weight: 900;
				
			}
			.type {
				margin: 10rpx 0;
				font-size: 18rpx;
				color: #999999;
				line-height: 28rpx;

			}
			.delivery-time {
				color: #e5d001;
				font-size: 24rpx;
			}
		}
		.right {
			margin-left: 10rpx;
			
			text-align: right;
			.decimal {
				font-size: 24rpx;
				margin-top: 4rpx;
			}
			.point{
				color: #333333;
				font-size: 18rpx;
			}
			.number {
				color: $u-tips-color;
				font-size: 24rpx;
			}
		}
	}
	.total {
		border: 1px solid #ECECEC;
		box-sizing: border-box;
		padding:8rpx 22rpx;
		margin-top: 30rpx;
		font-size: 24rpx;
		display: flex;
		border-radius: 40rpx;
		text{
			color: #BFBFBF;
		}
		view{
			color: #A9A9A9;
			margin-left: 10rpx;
		}
			}

}
.centre {
	text-align: center;
	margin: 200rpx auto;
	font-size: 32rpx;
	image {
		width: 164rpx;
		height: 164rpx;
		border-radius: 50%;
		margin-bottom: 20rpx;
	}
	.tips {
		font-size: 24rpx;
		color: #999999;
		margin-top: 20rpx;
	}
	.btn {
		margin: 80rpx auto;
		width: 200rpx;
		border-radius: 32rpx;
		line-height: 64rpx;
		color: #ffffff;
		font-size: 26rpx;
		background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%);
	}
}
.wrap {
	display: flex;
	flex-direction: column;
	height: calc(100vh - var(--window-top));
	width: 100%;
	background-color: $backgroundPage
}
.swiper-box {
	flex: 1;
}
.swiper-item {
	height: 100%;
	background-color: $backgroundPage
}
</style>
